package com.spring.aop;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by dong peng on 2018/1/6.
 */
@Service
public class AopTarget {

    public void sayHello() {
        int i = 1/ 0;
        System.out.println("Hello");
    }

    @MyException
    public Map sayAnnotation() {
        System.out.println("hello，我是注解切入业务方法");

        Map map = new HashMap();
        map.put("val","0000");
        return map;
    }
}
